|
|
|
|
|
|
|
LPVOID lpvNotifier, // specifies a handler for RasDial events
LPHRASCONN lphRasConn // pointer to variable to receive connection
// handle
); |
|
|
|
|
|
|
|
|
The LPRASDIALEXTENSIONS parameter is a structure that contains information on how to dial. The default values are fine for most situations, in which case you can pass a NULL value for this parameter or a structure with the fields set to 0. |
|
|
|
|
|
|
|
|
The lpszPhonebook parameter is the same as you've seen in the previous examples and will typically be declared ByVal As String and passed the value vbNullString. |
|
|
|
|
|
|
|
|
The lpRasDialParams parameter is a pointer to a RASDIALPARAMS structure loaded with information for the desired phone book entry. |
|
|
|
|
|
|
|
|
The dwNotifierType parameter is a 32-bit Long that should be declared ByVal. This can have four possible values. If set to 1, the lpvNotifier parameter should contain a handle to a window that will receive WM_RASDIALEVENT messages1 describing the progress of the dial-in operation. If the dwNotifierType parameter is set to 0 through 2, the lpvNotifier parameter should contain the address of a function that will be called with notification information during the course of the dial-in operation. When an API function calls a function address that you provide, the function you provide is called a ''callback function." |
|
|
|
|
|
|
|
|
The LPHRASCONN parameter is a pointer to a variable that will be loaded with the connection handle. Like all Win32 handles, this should be a 32-bit Long. |
|
|
|
|
|
|
|
|
The RasHangUp function hangs up the connection for a given connection handle. |
|
|
|
|
|
|
|
|
The following declarations are defined for the RASDIALEXTENSIONS structure and the RasDial and RasHangUp functions: |
|
|
|
|
|
|
|
|
Public Type RASDIALEXTENSIONS
dwSize As Long
dwfOptions As Long
hwndParent As Long
reserved As Long
End Type
Public Declare Function RasDial Lib "rasapi32.dll" Alias "RasDialA" ( _
lpRasDialExtensions As RASDIALEXTENSIONS, _
ByVal lpszPhonebook As String, _
lpRasDialParams As RASDIALPARAMS, _ |
|
|
|
 |
|
 |
|
|
1 A discussion of Windows messaging and subclassing can be found in both Dan Appleman's Visual Basic Programmer's Guide to the Win32 API and Dan Appleman's Developing COM/ActiveX Components with Visual Basic 6.0. Additional information, including a full-featured VB-authored subclasser, can be found in Desaware's SpyWorks package. |
|
|
|
|
|